#pragma once


#include "Event.h"
namespace Hazel{
    class HAZEL_API KeyEvent : public Event{
    public:
        EVENT_CLASS_CATEGORY(EventCategoryKeyboard | EventCategoryInput)
    protected:
        KeyEvent(int keycode) : m_keyCode(keycode) {}

        int m_keyCode;
    };

    class HAZEL_API KeyPressedEvent :public  KeyEvent{
    public:
        KeyPressedEvent(int keycode, int repeatCount) : KeyEvent(keycode),m_RepeatCount(repeatCount){}

        inline int GetRrepeatCount() const {return m_RepeatCount;}
        std::string ToString() const override {
            std::stringstream ss;
            ss<<"keypressedevent:"<<m_keyCode;
            return ss.str();
        }

        EVENT_CLASS_TYPE(KeyPressed)

    private:
        int m_RepeatCount;
    };

    class HAZEL_API KeyReleasedEvent : public KeyEvent{
    public:
        KeyReleasedEvent(int keycode) : KeyEvent(keycode){}
        std::string ToString() const override{
            std::stringstream ss;
            ss<<"keyreeve"<< m_keyCode;
            return ss.str();
        }

        EVENT_CLASS_TYPE(KeyReleased)
    };
}



















